<template>
	<view class="list_con">
		<view class="list_item_con" v-for="item in dataList" @click="goDetail(item.exhibitionId)" :key="item.exhibitionId">
			<view class="img_con">
				<image class="img" :src="item.exhibitionImage" mode="widthFix"></image>
			</view>
			<view class="text_con">
				<view class="item_title_con"><text class="item_title">{{item.exhibitionName}}</text></view>
				<view class="item_time">2020年08月15日</view>
				<view class="item_location">{{item.exhibitionAddress}}</view>
				<view class="item_tag_con">
					<text class="pay_tag" :class="'item'+index" v-for="(el,index) in item.exhibitionLabels" :key="index">{{el.exhibitionLabel}}</text>
				</view>
				<text class="item_price_con">
					<text class="symbol">￥</text>
					<text class="price">{{item.exhibitionPrice}}</text>
				</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			dataList:{
				type:Array
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			goDetail(pid) {
				// console.log(this.dataList)
				uni.navigateTo({
					url: '../detail/detail?pid='+pid
				});
			},
		},
		onLoad() {
			// console.log(this.dataList)
		}
	}
</script>

<style lang="scss" scoped>
.list_con {
	.list_item_con {
		position: relative;
		width: 100%;
		height: 320rpx;
		// outline: 1px solid red;
		display: flex;
		justify-content: flex-start;
		align-items: center;

		.img_con {
			width: 200rpx;
			height: 267rpx;
			background-color: #e1e1e1;
			overflow: hidden;
			border-radius: 8rpx;
			flex-shrink: 0;
			margin-right: 18rpx;
			.img{
				width: 100%;
			}
		}

		.text_con {
			display: flex;
			flex-direction: column;
			justify-content: center;
			height: 267rpx;
			flex-grow: 1;

			.item_title_con {
				margin-bottom: 26rpx;

				.item_title {
					line-height: 33rpx;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 1;
					/*显示行数*/
					overflow: hidden;
					font-family: 'PingFang SC Bold', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
					font-size: 30rpx;
					font-weight: bold;
					color: #333333;
				}
			}

			.item_time,
			.item_location {
				line-height: 25rpx;
				font-family: PingFangSC-Regular;
				font-size: 26rpx;
				color: #666666;
				margin-bottom: 19rpx;
			}

			.item_tag_con {
				box-sizing: border-box;
				// width: 234rpx;
				display: flex;
				justify-content: flex-start;
				align-items: center;
				margin-bottom: 20rpx;

				.pay_tag,
				.sponsor_tag {
					margin-right: 16rpx;
					box-sizing: border-box;
					line-height: 22rpx;
					padding: 7rpx 13rpx;
					border-radius: 6rpx;
					
					font-family: PingFangSC-Regular;
					font-size: 22rpx;
					
				}
				.item0{
					border: solid 1rpx #feaf37;
					color: #feaf37;
				}
				.item1 {
					border: solid 1rpx #fd6666;
					color: #fd6666;
				}
				.item2{
					border: solid 1rpx #e06fd5;
					color: #e06fd5;
				}
			}

			.item_price_con {
				display: block;
				height: 28rpx;
				font-family: PingFangSC-Semibold;
				line-height: 33rpx;
				font-size: 36rpx;
				color: #fd6666;

				.symbol {
					font-size: 24rpx;
					color: #fd6666;
				}
			}
		}

		&::before {
			position: absolute;
			left: 0;
			bottom: -1rpx;
			content: '';
			width: 100%;
			height: 2rpx;
			background-color: #f0f3f8;
		}
	}
}
</style>
